Skip to content

dev into main#35

Open
joefarrelly wants to merge 26 commits into
mainfrom
dev
Open

dev into main#35
joefarrelly wants to merge 26 commits into
mainfrom
dev

Conversation

@joefarrelly

@joefarrelly joefarrelly commented Jun 19, 2026

Copy link
Copy Markdown
Owner
  • add-readme-badges
  • celery-reliability
  • rename-armour-to-armor
  • phase-2a-achievements-reputations
  • phase-2a-ui-data-fixes
  • remove-keybind-feature
  • fix-admin-session-csrf
  • phase-2b-mythic-plus
  • schedule-fulldatascan-weekly
  • addon-gold-played-time-endpoint
  • fix-upload-closed-file
  • fix-addon-file-read-text-mode
  • addon-data-db-table
  • remove-codecov

@codecov-commenter

codecov-commenter commented Jun 19, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 43.87947% with 298 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
apicore/tasks.py 12.00% 198 Missing ⚠️
apicore/views.py 48.31% 92 Missing ⚠️
apicore/models.py 89.74% 8 Missing ⚠️

📢 Thoughts on this report? Let us know!

Merge rename-armour-to-armor into dev
Rename armour to armor + gitignore celerybeat
New models: DataAchievement, DataFaction, ProfileAltAchievement,
ProfileAltReputation with migration 0011.

fullDataScan now fetches achievement and reputation-faction indexes
from the Blizzard static API to populate the Data* tables.

scan_single_alt now fetches /achievements and /reputations per alt;
both sync helpers create Data* records lazily on first encounter.

purge_stale_profiles extended to clean up expired achievement and
reputation records.

New endpoints: /api/profile/altachievements/, /api/profile/altreputations/,
/api/data/achievements/, /api/data/factions/ — all support ?user=,
?alt=, ?realm= query params with session auth enforcement.

Excludes migrations from ruff lint.
- Add DataAchievement, DataFaction, ProfileAltAchievement, ProfileAltReputation models
- Add alt_ilvl field to ProfileAlt (populated from character summary on scan)
- Refactor fullAltScan: move mounts/pets/achievements to scan_user_collection
  which scans one highest-level/ilvl alt per faction instead of all alts
- Split fullDataScan into 5 independent subtasks with individual endpoints
- Add logout endpoint that flushes Django session
- Fix standing_value to IntegerField (Blizzard returns negative for Hated)
…ions

Merge phase-2a-achievements-reputations into dev
…view

- DataFaction.faction_category: new field (migration 0014) populated via
  hardcoded FACTION_EXPANSION map (283 factions, Classic → Midnight)
- _sync_reputations: use standing.name not standing.type (was always empty);
  derive faction_category from FACTION_EXPANSION map
- ProfileAltAchievementView: add ?summary=1 (category aggregates) and
  ?category=X (per-category lazy load) to avoid returning all achievements
- Achievement/rep serializers: expose alt_name and faction_category
- _sync_achievement_data: add progress logging every 100 achievements
Merge phase-2a-ui-data-fixes into dev
Keybind scraping/parsing/display was too niche to maintain. Deletes
keybind_builder.py, keybind_mapping.py, and their tests; trims
ProfileUserView.list to the generic page=header response plus the
parse-and-cache scaffolding (renamed cache key from keybinds:{user}
to userfile:{user}) for future addon-only data. tier_sort_key was
also used for profession tier sorting, not just keybinds, so it
moves to a new apicore/libs/expansion_order.py rather than being
deleted.
A lingering Django admin session (from triggering DataScan via
/api/admin/) made DRF's SessionAuthentication enforce CSRF on every
API call, since profile/custom endpoints use the custom IsSessionUser
permission rather than Django auth. Removed SessionAuthentication from
the default authenticators and scoped it explicitly to the
IsAdminUser-gated DataScan* viewsets that actually need it.
Adds DataMythicDungeon (static catalog), ProfileAltMythicPlus
(per-alt season rating summary), and ProfileAltMythicPlusDungeon
(per-alt per-dungeon best run) with migration 0015.

scanMythicDungeonData populates the dungeon catalog via
/data/wow/mythic-keystone/dungeon/index (namespace dynamic-eu, not
static-eu) and is added to fullDataScan. _sync_mythic_plus is wired
into scan_single_alt: the main mythic-keystone-profile endpoint only
lists season refs with no "current" flag, so max(season.id) picks
the current one, then a second call to the season-specific endpoint
fetches mythic_rating and best_runs. Verified against a live
character that best_runs can list two entries per dungeon
(best-timed vs best-overall, same map_rating but different
keystone_level) — deduped to the higher level per dungeon before
writing.

New endpoints: altmythicplus, altmythicplusdungeons, mythicdungeons,
datascan/mythicdungeons.
Runs every Sunday 03:00 UTC alongside the existing daily
purge_stale_profiles schedule. The admin-triggered datascan
endpoints are kept for ad-hoc manual scans.
perform_update closed the uploaded file's stream via a context manager
before handing it to the storage backend, which then failed trying to
re-read it. Validate and normalise the content directly, then save it
as a fresh ContentFile instead of reusing the original upload stream.
ProfileUserView.list opened the stored .lua file with mode "r" (text),
so readlines() already returned str, and the subsequent .decode("utf-8")
call crashed. This path was previously unreachable in practice (no page
read the file before page=addon was added) so the bug went unnoticed.
Replaces the page=addon read-through cache (which re-parsed the raw
.lua file on every cache miss, with no expiry) with parse-on-upload
into a new ProfileAltAddonData model, matching how every other
Profile* model is populated. Adds the altaddondata endpoint and drops
the now-dead generic file-read branch from ProfileUserView.list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants